//
//  ChangeCardStore.m
//  NewPro
//
//  Created by RYX on 2018/11/26.
//  Copyright © 2018年 何荧红. All rights reserved.
//

#import "ChangeCardStore.h"
#import "ChangeCardParametersModel.h"

@implementation ChangeCardStore

#pragma mark - 更改结算卡审核资料提交
- (void)postChangeCardDataWithParameters:(ChangeCardParametersModel *)parameters Success:(void(^)(void))success Failure:(void(^)(NSError *error))failure{
    
    NSString *url = [NSString stringWithFormat:@"%@/api/merchant/updatePOS",IP];
    NSDictionary *dic = @{
                          @"customId":parameters.customId,
                          @"merchantName":parameters.merchantName,
                          @"merchantNo":parameters.merchantNo,
                          @"bankCardNumber":parameters.bankCardNumber,
                          @"bank":parameters.bank,
                          @"bankFont":parameters.bankFont,
                          @"bankBack":parameters.bankBack,
                          @"khzh":parameters.khzh,
                          };
    
    [HttpTool postUrlWithString:url parameters:dic success:^(id responseObject) {
        
        NSError *error = [HttpTool inspectError:responseObject];
        
        if (error == nil) {
            
            success();
        }else{
            
            failure(error);
        }
        
    } failure:^(NSError *error) {
        
        failure(error);
    }];
    
}
@end
